import request from '@/utils/request'

// 查询idc列表
export function listIdc(query) {
  return request({
    url: '/cmdb/idc/list',
    method: 'get',
    params: query
  })
}

// 查询idc详细
export function getIdc(id) {
  return request({
    url: '/cmdb/idc/' + id,
    method: 'get'
  })
}

// 新增idc
export function addIdc(data) {
  return request({
    url: '/cmdb/idc',
    method: 'post',
    data: data
  })
}

// 修改idc
export function updateIdc(data) {
  return request({
    url: '/cmdb/idc',
    method: 'put',
    data: data
  })
}

// 删除idc
export function delIdc(id) {
  return request({
    url: '/cmdb/idc/' + id,
    method: 'delete'
  })
}
